package com.liu.susu.thread.task.cron;

import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

/**
 * @FileName TestCron1
 * @Description
 * @Author susu
 * @date 2022-03-07
 **/

@Component
public class TestCron1 {

//        @Scheduled(cron = "0/5 * * * * ?")
//@Scheduled(cron = "0/5 * * * * ? *")
//    @Scheduled(cron = "0/5 * * ? * 3#2")
//    @Scheduled(cron = "5-8 * * * * ?")
    public void taskTest(){
        System.out.println("taskTest()-->"+Thread.currentThread().getName()+"-->"
                + LocalDateTime.now());
    }

}
